import pluginVue from 'eslint-plugin-vue'
import vueTsEslintConfig from '@vue/eslint-config-typescript'
import stylistic from '@stylistic/eslint-plugin'
import unocss from '@unocss/eslint-config/flat'

export default [
  {
    name: 'app/files-to-lint',
    files: ['**/*.{ts,mts,tsx,vue}'],
  },

  {
    name: 'app/files-to-ignore',
    ignores: ['**/dist/**', '**/dist-ssr/**', '**/coverage/**'],
  },
  unocss,
  ...pluginVue.configs['flat/recommended'],
  ...vueTsEslintConfig(),
  stylistic.configs['recommended-flat'],

  {
    rules: {
      'unocss/order': 'warn',
      'vue/multi-word-component-names': 'off',
      'vue/max-attributes-per-line': ['warn', {
        singleline: {
          max: 3,
        },
        multiline: {
          max: 1,
        },
      }],
    },
  },
]
